﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <link href="App_Themes/Master.css" rel="stylesheet" type="text/css" />
    <title>Allianz Technologie - Finanças</title>
    <script type="text/javascript">
        function addTab(tabPanel, id, url, titulo) {
            var tab = tabPanel.getComponent(id);
            if (!tab) {
                tab = tabPanel.add({
                    id: id,
                    title: titulo,
                    closable: true,
                    autoLoad: {
                        showMask: true,
                        url: url,
                        mode: 'iframe',
                        maskMsg: 'Carregando ' + titulo + '...'
                    }
                });
            }
            tabPanel.setActiveTab(tab);
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <ext:ScriptManager ID="ScriptManager1" runat="server" Theme="Slate" />
        <ext:ViewPort ID="ViewPort1" runat="server">
            <Body>
                <ext:BorderLayout ID="BorderLayout1" runat="server">
                    <North>
                        <ext:Panel ID="Panel1" runat="server" Height="50" Border="false">
                            <Body>
                                <div id="divCabecalho">
                                    <div id="divCabecEsq">
                                        <asp:Image runat="server" ImageUrl="~/App_Themes/Images/Logo.png" />
                                    </div>
                                    <div id="divCabecDir">
                                    </div>
                                    <div id="divCabecCentro">
                                        <asp:Label runat="server" Text="Finanças" CssClass="TitlePortal"></asp:Label>
                                    </div>
                                </div>
                            </Body>
                        </ext:Panel>
                    </North>
                    <East Collapsible="true" Split="true">
                        <ext:Panel ID="Panel2" runat="server" Title="Ajuda" Width="175" Collapsed="true"
                            Icon="Help">
                            <Body>
                            </Body>
                        </ext:Panel>
                    </East>
                    <South>
                        <ext:Panel ID="Panel3" runat="server" Height="25" Border="false">
                            <Body>
                                <ext:StatusBar ID="StatusBar" runat="server" DefaultText="© 2009 por AllianzTech. Todos os direitos reservados"
                                    StatusAlign="Left">
                                    <Items>
                                        <ext:ToolbarTextItem ID="ToolbarTextItem" runat="server" Text="Finanças por" />
                                        <ext:ToolbarTextItem ID="ToolbarTextItem1" runat="server" Text="AllianzTech" />
                                    </Items>
                                </ext:StatusBar>
                            </Body>
                        </ext:Panel>
                    </South>
                    <West Collapsible="true" Split="true">
                        <ext:Panel ID="pnlAcoes" runat="server" Title="Ações" Width="175" Icon="ApplicationCascade">
                            <Body>
                                <%--Cria o Menu de Atalhos--%>
                                <ext:MenuPanel ID="menAtalhos" runat="server" Title="Atalhos" AutoWidth="true" AutoHeight="true" Icon="Link">
                                    <Menu>
                                        <Items>
                                            <ext:MenuItem ID="meATitulos" runat="server" Text="Titulos" Icon="NewBlue">
                                                <Listeners>
                                                    <Click Handler="addTab(#{TabPanel1}, 'tbTitulos', 'Titulos.aspx', 'Titulos');" />
                                                </Listeners>
                                            </ext:MenuItem>
                                            <ext:MenuItem ID="meAProspect" runat="server" Text="Cadastros" Icon="NewBlue">
                                                <Listeners>
                                                    <Click Handler="addTab(#{TabPanel1}, 'tbCadastros', 'Cadastro.aspx', 'Cadastros');" />
                                                </Listeners>
                                            </ext:MenuItem>
                                            <ext:MenuItem ID="meIOportunidade" runat="server" Text="Nova Oportunidade" Icon="NewBlue">
                                                <Listeners>
                                                    <Click Handler="addTab(#{TabPanel1}, 'tbIdLead', '../CRM/Oportunidade.aspx?Etapa=3', 'Negócio');" />
                                                </Listeners>
                                            </ext:MenuItem>
                                            <ext:MenuItem ID="meIProposta" runat="server" Text="Nova Proposta" Icon="NewBlue">
                                                <Listeners>
                                                    <Click Handler="addTab(#{TabPanel1}, 'tbIdLead', '../CRM/Oportunidade.aspx?Etapa=4', 'Negócio');" />
                                                </Listeners>
                                            </ext:MenuItem>
                                            <ext:MenuItem ID="meIPnlVenda" runat="server" Text="Painel de Vendas" Icon="Report">
                                                <Listeners>
                                                    <Click Handler="addTab(#{TabPanel1}, 'tbIdPnlVendas', '../CRM/PainelDeVendas.aspx?Etapa=0', 'Painel de Vendas');" />
                                                </Listeners>
                                            </ext:MenuItem>
                                        </Items>
                                    </Menu>
                                </ext:MenuPanel>
                                <%--Cria o Menu do Sistema--%>
                                <ext:MenuPanel ID="menSistema" runat="server" Title="Menu" AutoWidth="true" AutoHeight="true" Icon="ApplicationLink">
                                    <Menu>
                                        <Items>
                                            <%--Menu Relatórios--%>
                                            <ext:MenuItem ID="memRelatorios" runat="server" Text="Relatórios" Icon="Package">
                                                <Menu>
                                                    <ext:Menu>
                                                        <Items>
                                                            <ext:MenuItem ID="memRelPainelVendas" runat="server" Text="Painel de Vendas" Icon="ApplicationKey">
                                                                <Listeners>
                                                                    <Click Handler="addTab(#{TabPanel1}, 'tbIdPnlVendas', '../CRM/PainelDeVendas.aspx?Etapa=0', 'Painel de Vendas');" />
                                                                </Listeners>
                                                            </ext:MenuItem>
                                                        </Items>
                                                    </ext:Menu>
                                                </Menu>
                                            </ext:MenuItem>
                                            <%--Menu Administração--%>
                                            <ext:MenuItem ID="memAdministracao" runat="server" Text="Administração" Icon="Package">
                                                <Menu>
                                                    <ext:Menu>
                                                        <Items>
                                                            <ext:MenuItem ID="memAdmUsuarios" runat="server" Text="Usuários" Icon="ApplicationKey">
                                                                <Listeners>
                                                                    <Click Handler="addTab(#{TabPanel1}, 'idPnlAdmUsuarios', '../CRM/Cadastro.aspx', 'Usuários');" />
                                                                </Listeners>
                                                            </ext:MenuItem>
                                                            <ext:MenuItem ID="memAdmPermissaoUso" runat="server" Text="Permissão de Uso" Icon="ApplicationKey">
                                                                <Listeners>
                                                                    <Click Handler="addTab(#{TabPanel1}, 'idPnlAdmPermUso', '../CRM/Cadastro.aspx', 'Permissão de Uso');" />
                                                                </Listeners>
                                                            </ext:MenuItem>
                                                        </Items>
                                                    </ext:Menu>
                                                </Menu>
                                            </ext:MenuItem>
                                        </Items>
                                    </Menu>
                                </ext:MenuPanel>
                            </Body>
                        </ext:Panel>
                    </West>
                    <Center>
                        <ext:TabPanel ID="TabPanel1" runat="server" EnableTabScroll="true"> <%--BodyStyle="padding: 5px; padding-left: 10px">--%>
                            <Tabs>
                                <ext:Tab ID="idDashBoard" runat="server" Title="Projeção Financeira">
                                    <AutoLoad Url="ProjecaoFinanceira.aspx" Mode="IFrame">
                                    </AutoLoad>
                                </ext:Tab>
                            </Tabs>
                        </ext:TabPanel>
                    </Center>
                </ext:BorderLayout>
            </Body>
        </ext:ViewPort>
    </div>
    </form>
</body>
</html>
